package com.ruoyi.common.entity.TransactionEntity;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.ruoyi.common.entity.CoreEntity.store.StoreInfo;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 骑手订单配送记录对象 rider_order
 * 
 * @author swy
 * @date 2025-08-07
 */
public class RiderOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;
    private Rider rider;
    private StoreInfo storeInfo;
    private ShopOrder shopOrder;

    public Rider getRider() { return rider; }
    public void setRider(Rider rider) { this.rider = rider; }
    public StoreInfo getStoreInfo() { return storeInfo; }
    public void setStoreInfo(StoreInfo storeInfo) { this.storeInfo = storeInfo; }
    public ShopOrder getOrder() { return shopOrder; }
    public void setOrder(ShopOrder shopOrder) { this.shopOrder = shopOrder; }

    /** 配送记录ID，自增主键 */
    private Integer id;

    /** 骑手ID（关联 rider 表） */
    @Excel(name = "骑手ID", readConverterExp = "关=联,r=ider,表=")
    private Integer riderId;

    /** 门店ID（关联 store_store 表） */
    @Excel(name = "门店ID", readConverterExp = "关=联,s=tore_store,表=")
    private Integer storeId;

    /** 订单ID（关联 shop_order 表） */
    @Excel(name = "订单ID", readConverterExp = "关=联,s=hop_order,表=")
    private Integer orderId;

    /** 系统/门店分配时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "系统/门店分配时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date assignTime;

    /** 取货时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "取货时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date pickupTime;

    /** 送达时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "送达时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deliveryTime;

    /** 送达凭证图片URL */
    @Excel(name = "送达凭证图片URL")
    private String deliveryProofUrl;

    /** 配送状态（0-待接单，1-已接单，2-取货中，3-配送中，4-已完成，5-已取消） */
    @Excel(name = "配送状态", readConverterExp = "0=-待接单，1-已接单，2-取货中，3-配送中，4-已完成，5-已取消")
    private Integer status;

    /** 取消原因 */
    @Excel(name = "取消原因")
    private String cancelReason;

    /** 骑手备注信息 */
    @Excel(name = "骑手备注信息")
    private String riderNotes;

    /** 逻辑删除标志（0-未删除，1-已删除） */
    private String delFlag;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdAt;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedAt;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setRiderId(Integer riderId) 
    {
        this.riderId = riderId;
    }

    public Integer getRiderId() 
    {
        return riderId;
    }

    public void setStoreId(Integer storeId) 
    {
        this.storeId = storeId;
    }

    public Integer getStoreId() 
    {
        return storeId;
    }

    public void setOrderId(Integer orderId) 
    {
        this.orderId = orderId;
    }

    public Integer getOrderId() 
    {
        return orderId;
    }

    public void setAssignTime(Date assignTime) 
    {
        this.assignTime = assignTime;
    }

    public Date getAssignTime() 
    {
        return assignTime;
    }

    public void setPickupTime(Date pickupTime) 
    {
        this.pickupTime = pickupTime;
    }

    public Date getPickupTime() 
    {
        return pickupTime;
    }

    public void setDeliveryTime(Date deliveryTime) 
    {
        this.deliveryTime = deliveryTime;
    }

    public Date getDeliveryTime() 
    {
        return deliveryTime;
    }

    public void setDeliveryProofUrl(String deliveryProofUrl) 
    {
        this.deliveryProofUrl = deliveryProofUrl;
    }

    public String getDeliveryProofUrl() 
    {
        return deliveryProofUrl;
    }

    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    public void setCancelReason(String cancelReason) 
    {
        this.cancelReason = cancelReason;
    }

    public String getCancelReason() 
    {
        return cancelReason;
    }

    public void setRiderNotes(String riderNotes) 
    {
        this.riderNotes = riderNotes;
    }

    public String getRiderNotes() 
    {
        return riderNotes;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    public void setCreatedAt(Date createdAt) 
    {
        this.createdAt = createdAt;
    }

    public Date getCreatedAt() 
    {
        return createdAt;
    }

    public void setUpdatedAt(Date updatedAt) 
    {
        this.updatedAt = updatedAt;
    }

    public Date getUpdatedAt() 
    {
        return updatedAt;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("riderId", getRiderId())
            .append("storeId", getStoreId())
            .append("orderId", getOrderId())
            .append("assignTime", getAssignTime())
            .append("pickupTime", getPickupTime())
            .append("deliveryTime", getDeliveryTime())
            .append("deliveryProofUrl", getDeliveryProofUrl())
            .append("status", getStatus())
            .append("cancelReason", getCancelReason())
            .append("riderNotes", getRiderNotes())
            .append("delFlag", getDelFlag())
            .append("createdAt", getCreatedAt())
            .append("updatedAt", getUpdatedAt())
            .toString();
    }
}
